import { createApp, defineAsyncComponent } from 'vue';
const app = createApp({});

const AsyncComp = defineAsyncComponent(
    () =>
        new Promise((resolve, reject) => {
          resolve({
            template: `
            <div>这是一个异步组件</div>
            <async-example2></async-example2>
            `
          })
        })
);
const AsyncComp2 = defineAsyncComponent(() =>
    import('./demo11-module-demo01-children02.vue')
)
app.component('async-example2', AsyncComp2);

//暴露
export default{
    components:{
        AsyncComp,
    }
}
